/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.edu.utn.frsf.tpae.a2012.g03.model;

import java.util.Date;

/**
 * Objeto del modelo de datos (persistente). Representa una caja de ahorros.
 * @author fededalla
 */
public class CajaAhorro extends Cuenta {
    private double cjaAhoIntMens;
    private Cuenta cta;
    
    public CajaAhorro(Integer ctaId) {
        this.ctaId = ctaId;
    }

    public CajaAhorro(double cjaAhoIntMens, Integer ctaId, long ctaNro, Date ctaFechApe, double ctaSdoAct) {
    	super(ctaId, ctaNro, ctaFechApe, ctaSdoAct);
        this.cjaAhoIntMens = cjaAhoIntMens;
    }

    public double getCjaAhoIntMens() {
        return cjaAhoIntMens;
    }

    public void setCjaAhoIntMens(double cjaAhoIntMens) {
        this.cjaAhoIntMens = cjaAhoIntMens;
    }


    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CajaAhorro)) {
            return false;
        }
        CajaAhorro other = (CajaAhorro) object;
        if ((ctaId == null && other.ctaId != null) || (this.ctaId != null && !this.ctaId.equals(other.ctaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.CjaAho[ ctaId=" + ctaId + " ]";
    }

}
